<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>select</title>
<script src="../js/jweixin-1.2.0.js"></script>
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js">
</script>
<script>

    $(document).ready(function(){
        $("#select").click(function () {
            alert("1111！！！")
            var id = $("#tid").val();

            $.ajax({
                type: "GET",
                url: "/test/getUserById",
                dataType: "json",
                data: {
                    id: id,

                },
                success: function (data) {
                    console.log(data);
                    alert(data.name);
                },
                error: function (xhr, textStatus) {
                    console.log('错误');
                    console.log(xhr);
                    console.log(textStatus);
                }
            });
        });
    });
</script>
</head>
<body>
<h1>this is login</h1>
id
<input type="text" id="tid"/>
<td><input type="button" id="select" value=" 查询 "></td>

</body>
</html>
